Repository navigation
Add CHT fixes to CML release - #1862
cujomalainey wants to merge 4 commits into
Conversation
Need to add the SCHED_COMP name so pipeline will properly load Signed-off-by: Curtis Malainey <cujomalainey@google.com>
Topology will fail to probe without these widgets Signed-off-by: Curtis Malainey <cujomalainey@google.com>
The DAI definition needs to come first otherwise the media pipeline with be parsed incorrectly resulting in a failure to load the topology Signed-off-by: Curtis Malainey <cujomalainey@google.com>
The 3rd DMAC that CHT has seems to be causing issues. Since it is not needed lets make it optional so the platform can be usable. Signed-off-by: Curtis Malainey <cujomalainey@google.com>
|
Waiting on kernel driver release before I can fully test this |
|
SOFCI TEST |
|
@cujomalainey let me know how kernel test goes. |
|
I got audio working but it is occasionally heavily distorted, playing a 440Hz Sine wave generates peaks at 164, 220, 270, 574, etc. DMA also occasionally fails if playback through speaker-test is run without -D |
|
The issues appear to be tied to the boot beep. If the boot beep is bypassed then everything is fine. If it is not bypassed then everything breaks |
|
On 9/30/19 3:00 PM, Curtis Malainey wrote:
The issues appear to be tied to the boot beep. If the boot beep is
bypassed then everything is fine. If it is not bypassed then everything
breaks
This points to registers not being set with their usual default values,
with some remanent state coming from Coreboot, no?
|
|
That appears to be the conclusion we are forming here as well. I am going to dive into the coreboot code to see what is happening on cht. |
|
It looks like the boot beep driver has no reset sequence (which appears to be the standard). |
|
Hmm, it looks like this could be tied to the incompleteness of the reset sequence for the baytrail ssp driver https://github.com/thesofproject/sof/blob/master/src/drivers/intel/baytrail/ssp.c#L131 |
|
At one time I had a busybox based script to just dump all SSP register values. Maybe we should use this to check what is different with and without beep tone. |
|
Sounds like a good plan to me, if you can't find it I can just dump them manually using logger |
|
This is the only thing I can find. If you can trace what the SSP base is in your device this should help #!/bin/bash
#define SSCR0 0x00
#define SSCR1 0x04
#define SSSR 0x08
#define SSITR 0x0C
#define SSDR 0x10
#define SSTO 0x28
#define SSPSP 0x2C
#define SSTSA 0x30
#define SSRSA 0x34
#define SSTSS 0x38
#define SSCR2 0x40
#define SFIFOTT 0x6C
#define SSCR3 0x70
#define SSCR4 0x74
#define SSCR5 0x78
#SSP base address 0x90ca2000
echo -e "SSCR0 \t" `busybox devmem 0x90ca2000`
echo -e "SSCR1 \t" `busybox devmem 0x90ca2004`
echo -e "SSSR \t" `busybox devmem 0x90ca2008`
echo -e "SSITR \t" `busybox devmem 0x90ca200C`
echo -e "SSDR \t" `busybox devmem 0x90ca2010`
echo -e "SSTO \t" `busybox devmem 0x90ca2028`
echo -e "SSPSP \t" `busybox devmem 0x90ca202C`
echo -e "SSTSA \t" `busybox devmem 0x90ca2030`
echo -e "SSRSA \t" `busybox devmem 0x90ca2034`
echo -e "SSRSS \t" `busybox devmem 0x90ca2038`
echo -e "SSCR2 \t" `busybox devmem 0x90ca2040`
echo -e "SFIFOTT\t" `busybox devmem 0x90ca206C`
echo -e "SSCR3 \t" `busybox devmem 0x90ca2070`
echo -e "SSCR4 \t" `busybox devmem 0x90ca2074`
echo -e "SSCR5 \t" `busybox devmem 0x90ca2078` |
|
@cujomalainey maybe also worth checking DMA reset state for PC beep too (although I'm not sure if coreboot will use the DMA for beep). |
my understanding is that it's a pure PIO operation, without any DMA, with direct access to SSP FIFOs |
|
@plbossart yep I have heard the same thing, I saw no references to DMA when browsing the code generating the audio |
|
ok great, one more thing we may need to manually clear all PIO SSP status IRQ sources in the status register before switching SSP into DMA handshake mode. There may also be stale data in the Tx/Rx FIFO too (that can be flushed using PIO). |
|
Did a diff on the registers in SOF after the initial write, the is only difference I found, would this cause the behaviour observed? |
|
answered my own question by writing the good value first in the bad case, did not fix the hardware. Here is the diff of the register state before the driver does its initial writes, does something maybe need to be reset? |
|
@lgirdwood how would I go about clearing the PIO SSP status? |
|
@cujomalainey I've sent you some infomation on the SSP bits, this is interesting as I would have assumed resetting the values would have worked. It's the occasional breakage that's interesting. Btw, can you capture when it breaks, that might help us root cause if DMA is somehow getiing misaligned between R/W periods. The SSSR register is R1C, so may need to be forced to reset state when switching from PIO to DMA mode. Btw, can we merge this PR ? |
|
Ok thanks, I will get to it in a bit, yes let's merge and move this discussion to an issue. Since the root cause appears to be independent of the changes made I see no issue merging this. |
|
are all these changes in the master branch? |
|
Yes, some are backported but they are all present on master |
|
SOFCI TEST |
|
abandoning and moving to next release if all bugs are fixed |
CHT and CML share the same kernel, therefore the fixes need to be instep on the same branches. This will allow strago boards to start using SOF for their uprev.
Notes: "topology: sof-cht-max98090: fix media pipeline" and "topology: sof-cht-max98090 move dai definition above media pipeline" did not apply cleanly and the HACK commit will be replaced once the final solution for disabling the CHT dmac has been merged into master